package top.infopub.model.cap;

import org.apache.commons.lang3.StringUtils;
import top.infopub.enums.cap.FinancialStyleEnum;

import java.math.BigDecimal;

/*合同评审详情中所需借款合同的结果*/
public class ContractReviewLoad {

    /*pk*/
    private String id;
    /*codes*/
    private String codes;
    /*金融机构*/
    private String dockBank;
    /*融资类型*/
    private String financingType;
    /*合同总金额*/
    private BigDecimal sumAmt;
    /*综合成本*/
    private String embeddedCost;
    /*融资成本*/
    private String financingCost;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCodes() {
        return codes;
    }

    public void setCodes(String codes) {
        this.codes = codes;
    }

    public String getDockBank() {
        return dockBank;
    }

    public void setDockBank(String dockBank) {
        this.dockBank = dockBank;
    }

    public String getFinancingType() {
        return financingType;
    }

    public void setFinancingType(String financingType) {
        this.financingType = financingType;
        if (StringUtils.isNotBlank(financingType)) {
            FinancialStyleEnum ppdt = FinancialStyleEnum.getByCode(financingType);
            if (ppdt != null) {
                setFinancingType(ppdt.getName());
            }
        }

    }

    public BigDecimal getSumAmt() {
        return sumAmt;
    }

    public void setSumAmt(BigDecimal sumAmt) {
        this.sumAmt = sumAmt;
    }

    public String getEmbeddedCost() {
        return embeddedCost;
    }

    public void setEmbeddedCost(String embeddedCost) {
        this.embeddedCost = embeddedCost;
    }

    public String getFinancingCost() {
        return financingCost;
    }

    public void setFinancingCost(String financingCost) {
        this.financingCost = financingCost;
    }
}
